package com.evildog.workspace.life.application.convert;

import com.evildog.workspace.common.result.PagedResult;
import java.util.List;
import com.evildog.workspace.life.application.vo.DiaryPageVO;
import com.evildog.workspace.life.application.vo.DiaryListVO;
import com.evildog.workspace.life.application.vo.DiaryVO;
import com.evildog.workspace.life.application.dto.DiaryPageDTO;
import com.evildog.workspace.life.application.dto.DiaryListDTO;
import com.evildog.workspace.life.application.dto.DiaryDTO;
import com.evildog.workspace.life.application.model.DiaryParam;
import com.evildog.workspace.life.application.model.DiaryPageParam;
import com.evildog.workspace.life.application.model.DiaryListParam;
import com.evildog.workspace.life.application.bo.DiaryBO;
import com.evildog.workspace.life.application.bo.DiaryPageBO;
import com.evildog.workspace.life.application.bo.DiaryListBO;
import com.evildog.workspace.life.application.entity.Diary;
import com.evildog.workspace.life.application.entity.DiaryPageDO;
import com.evildog.workspace.life.application.entity.DiaryListDO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

@Mapper
public interface DiaryConvert {

    DiaryConvert INSTANCE = Mappers.getMapper(DiaryConvert.class);

    DiaryPageDTO convert(DiaryPageParam diaryPageParam);

    DiaryListDTO convert(DiaryListParam diaryListParam);

    DiaryDTO convert(DiaryParam diaryParam);

    @Mapping(target = "isDeleted", ignore = true)
    Diary convert(DiaryDTO diaryDTO);

    DiaryPageDO convert(DiaryPageDTO diaryPageDTO);

    DiaryVO convert(DiaryBO diaryBO);

    DiaryBO convert(Diary diary);

    List<DiaryListBO> convert(List<DiaryListDO> diaryList);

    List<DiaryListVO> convertVoList(List<DiaryListBO> diaryListBO);

    @Mappings({})
    PagedResult<DiaryPageBO> convert(IPage<DiaryPageDO> page);

    PagedResult<DiaryPageVO> convert(PagedResult<DiaryPageBO> page);
}